<?xml version="1.0" encoding="ISO-8859-1"?>
<ui:composition xmlns="http://www.w3.org/1999/xhtml"
  xmlns:ui="http://java.sun.com/jsf/facelets"
  xmlns:h="http://java.sun.com/jsf/html"
  xmlns:f="http://java.sun.com/jsf/core"
  xmlns:s="http://jboss.com/products/seam/taglib"
  template="/WEB-INF/templates/template.xhtml"
  xmlns:a4j="http://richfaces.org/a4j"
  xmlns:rich="http://richfaces.org/rich">
  
  <ui:define name="head">
  </ui:define>
<ui:define name="actualizarConsumoMaquina">
   <center >
    <br />
   <h:outputText value="Actualizacion Consumo Maquina"  styleClass="tituloabm"/>
	<br />
	<br />
   <div class ="divabm">
   <h:form  id = "actualizeconsumomaquinaform" rendered="#{appUser.userLogin != null}">
    	<h:panelGrid columns="1">
    		<h:outputText value="#{messages.editactulizeconsumomaquina}" />
    	</h:panelGrid>
    	<h:dataTable value="#{maquinaCtrl.consumoMaquinas}" var="consumo" styleClass="mainTable" headerClass="heading" columnClasses="even,even,even,even">
    		<h:column>
	   			<f:facet name ="header" >
	   		  		<h:outputText value="Articulo" style="FONT-WEIGHT: bold;"/>
	   			</f:facet>
	   			<h:outputText value="#{consumo.articulo.descripcion}" />	
	   		</h:column>
	   		<h:column>
	   			<f:facet name ="header" >
	   		  		<h:outputText value="Seleccionar" style="FONT-WEIGHT: bold;"/>
	   			</f:facet>
	   			<h:selectBooleanCheckbox value="#{consumo.selected}" />
	   		</h:column>
    		<h:column>
	   			<f:facet name ="header" >
	   		  		<h:outputText value="Consumo" style="FONT-WEIGHT: bold;"/>
	   			</f:facet>
	   			<h:inputText value="#{consumo.consumo}" />
	   		</h:column>
	   		<h:column>
	   			<f:facet name ="header" >
	   		  		<h:outputText value="Medida" style="FONT-WEIGHT: bold;"/>
	   			</f:facet>
	   			<h:outputText value="#{consumo.maquina.unidadMedida.descripcion}" />
	   		</h:column>
    	</h:dataTable>
    	<br />
		<br />
    	<h:panelGrid columns="3">
    		   <h:commandButton action="#{maquinaCtrl.actualizarConsumo}" image = "resources/img/button-save.png"  />
    	</h:panelGrid>
    	<h:panelGrid columns="1">
    			<h:outputText id="savesuccessmsg" value="#{messages.savesuccess}" rendered = "#{maquinaCtrl.saveSuccess}"  style="FONT-WEIGHT: bold; COLOR: #ff0000;"/>
    			<h:outputText id="deletesuccessmsg" value="#{messages.deletesuccess}" rendered = "#{maquinaCtrl.deleteSuccess}"  style="FONT-WEIGHT: bold; COLOR: #ff0000;"/>
    	</h:panelGrid>
    </h:form>
	
	</div>
	</center>
	</ui:define>
	<ui:define name="body">
 </ui:define>    
 </ui:composition>

